public class Student {
    // 成员属性
    private int id; // 学生ID
    private String name; // 学生姓名
    private String gender; // 学生性别
    private String clazz; // 学生班级
    private double mathScore; // 高数成绩
    private double javaScore; // Java成绩

    // 无参构造方法
    public Student() {
    }

    // 带参数的构造方法
    public Student(int id, String name, String gender, String clazz, double mathScore, double javaScore) {
        this.id = id;
        this.name = name;
        this.gender = gender;
        this.clazz = clazz;
        this.mathScore = mathScore;
        this.javaScore = javaScore;
    }

    // id属性的set和get方法
    public void setId(int id) {
        this.id = id;
    }

    public int getId() {
        return id;
    }

    // name属性的set和get方法
    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    // gender属性的set和get方法
    public void setGender(String gender) {
        this.gender = gender;
    }

    public String getGender() {
        return gender;
    }

    // clazz属性的set和get方法
    public void setClazz(String clazz) {
        this.clazz = clazz;
    }

    public String getClazz() {
        return clazz;
    }

    // mathScore属性的set和get方法
    public void setMathScore(double mathScore) {
        this.mathScore = mathScore;
    }

    public double getMathScore() {
        return mathScore;
    }

    // javaScore属性的set和get方法
    public void setJavaScore(double javaScore) {
        this.javaScore = javaScore;
    }

    public double getJavaScore() {
        return javaScore;
    }

    // 重写toString方法，方便打印学生信息
    @Override
    public String toString() {
        return "Student{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", gender='" + gender + '\'' +
                ", clazz='" + clazz + '\'' +
                ", mathScore=" + mathScore +
                ", javaScore=" + javaScore +
                '}';
    }

    // 测试方法
    public static void main(String[] args) {
        // 创建Student对象并设置属性
        Student student = new Student();
        student.setId(1);
        student.setName("张三");
        student.setGender("男");
        student.setClazz("软件工程1班");
        student.setMathScore(85.5);
        student.setJavaScore(90.0);

        // 使用get方法获取属性并打印
        System.out.println("学生ID：" + student.getId());
        System.out.println("学生姓名：" + student.getName());
        System.out.println("学生性别：" + student.getGender());
        System.out.println("学生班级：" + student.getClazz());
        System.out.println("高数成绩：" + student.getMathScore());
        System.out.println("Java成绩：" + student.getJavaScore());

        // 使用toString方法打印学生信息
        System.out.println(student);
    }
}
